package com.hc.bankonline.services;

import java.util.Map;

import com.hc.bankonline.dao.BankOnlineDao;

public class BankOnlineservicesImpl implements BankOnlineservices {
	BankOnlineDao bankOnlineDao = new BankOnlineDao();
	@Override
	public Map<String, Object> findLoginInfo(String loginAccount,
			String loginPassword) {
		return bankOnlineDao.findLoginInfo(loginAccount, loginPassword);
	}
	@Override
	public int findBalanceInfo(int id) {
		return bankOnlineDao.findBalanceInfo(id);
	}
	@Override
	public boolean transferAddInfo(String cardno,int money) {
		int result = bankOnlineDao.transferAddInfo(cardno,money);
		if(result > 0){
			return true;
		}
		return false;
	}
	@Override
	public boolean transferDelInfo(String cardno, int money) {
		int result = bankOnlineDao.transferDelInfo(cardno, money);
		if(result > 0){
			return true;
		}
		return false;	
	}
	@Override
	public boolean updatePwdInfo(String loginAccount, String loginPassword,String newPassword) {
		int result = bankOnlineDao.updatePwdInfo(loginAccount,loginPassword,newPassword);
		if(result > 0){
			return true;
		}
		return false;
	}

}
